package com.yunqiao.api;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @program: yunqiao
 * @description:
 * @author: Crocutax
 * @company: 今日速运
 * @e-mail: wangxw725@163.com
 * @create: 2019-02-16 14:54
 **/
@EnableScheduling        //开启定时任务支持
@EnableAsync            //开启多线程异步任务支持
@ServletComponentScan   //开启对监听器@WebListener注解支持
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class},scanBasePackages = {"com.yunqiao"})
@MapperScan(basePackages = "com.yunqiao.service.*.mapper.*")
public class ApiApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(ApiApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(ApiApplication.class);
    }
}

